#彩图R、G、B的提取
import numpy as np
import cv2
imagepath="C:\\opencv\\opencv\\sources\\samples\\data\\lena.jpg"
image = cv2.imread(imagepath)
cv2.imshow("Original image",image)
cv2.waitKey(0)

#R、G、B分量的提取
(B,G,R) = cv2.split(image)#提取R、G、B分量
cv2.imshow("Red",R)
cv2.imshow("Green",G)
cv2.imshow("Blue",B)
cv2.waitKey(0)
